<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.duplicate_filter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        Module&nbsp;duplicate_filter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="simvoc.core.duplicate_filter-module.html">Module simvoc.core.duplicate_filter</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"># Output pipeline component for suppressing duplicate results</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"># Author:   Mike Murphy &lt;mamurph@cs.clemson.edu&gt;</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"># Revision: 23 September 2009</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment">#   Copyright 2009 Clemson University</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment">#   Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment">#   you may not use this file except in compliance with the License.</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment">#   You may obtain a copy of the License at</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment">#       http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-comment">#   Unless required by applicable law or agreed to in writing, software</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-comment">#   distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-comment">#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-comment">#   See the License for the specific language governing permissions and</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-comment">#   limitations under the License.</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-comment"># This material is based upon work supported under a National Science</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-comment"># Foundation Graduate Research Fellowship. Any opinions, findings,</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-comment"># conclusions or recommendations expressed in this publication are those of</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-comment"># the author(s) and do not necessarily reflect the views of the National</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-comment"># Science Foundation.</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">Output pipeline component used for suppressing duplicate results. Two results</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">are considered duplicates if all result data values are the same (timestamps</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">may differ).</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module simvoc.core.kernel=simvoc.core.kernel-module.html"><a title="simvoc.core.kernel" class="py-name" href="#" onclick="return doclink('link-0', 'kernel', 'link-0');">kernel</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class simvoc.core.kernel.Output=simvoc.core.kernel.Output-class.html"><a title="simvoc.core.kernel.Output" class="py-name" href="#" onclick="return doclink('link-1', 'Output', 'link-1');">Output</a></tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="DuplicateFilter"></a><div id="DuplicateFilter-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="DuplicateFilter-toggle" onclick="return toggle('DuplicateFilter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html">DuplicateFilter</a><tt class="py-op">(</tt><tt class="py-base-class">Output</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="DuplicateFilter-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">   <tt class="py-docstring">'''</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">   Output handler that prevents duplicate results from being transmitted</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">   downstream. This handler is designed to be used with a downstream</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">   output handler in the pipeline and is not ended to be a final output</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">   destination.</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">   '''</tt> </tt>
<a name="DuplicateFilter.__init__"></a><div id="DuplicateFilter.__init__-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="DuplicateFilter.__init__-toggle" onclick="return toggle('DuplicateFilter.__init__');">-</a><tt class="py-line">   <tt class="py-keyword">def</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">output_handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter.__init__-collapsed" style="display:none;" pad="+++" indent="+++++++"></div><div id="DuplicateFilter.__init__-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">      <tt class="py-docstring">'''</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">      @param output_handler: Downstream output handler instance (required)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">      '''</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">      <tt id="link-2" class="py-name"><a title="simvoc.core.kernel.Output" class="py-name" href="#" onclick="return doclink('link-2', 'Output', 'link-1');">Output</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method simvoc.core.aggregator.Aggregator.__init__()=simvoc.core.aggregator.Aggregator-class.html#__init__,Method simvoc.core.ce_sim.Site.__init__()=simvoc.core.ce_sim.Site-class.html#__init__,Method simvoc.core.cluster_sim.Cluster.__init__()=simvoc.core.cluster_sim.Cluster-class.html#__init__,Method simvoc.core.cluster_sim.Machine.__init__()=simvoc.core.cluster_sim.Machine-class.html#__init__,Method simvoc.core.cluster_sim.MachineFactory.__init__()=simvoc.core.cluster_sim.MachineFactory-class.html#__init__,Method simvoc.core.common_reader.CommonReader.__init__()=simvoc.core.common_reader.CommonReader-class.html#__init__,Method simvoc.core.condor_sim.Condor.__init__()=simvoc.core.condor_sim.Condor-class.html#__init__,Method simvoc.core.control_scheduler.ControlScheduler.__init__()=simvoc.core.control_scheduler.ControlScheduler-class.html#__init__,Method simvoc.core.db_output.DBOutput.__init__()=simvoc.core.db_output.DBOutput-class.html#__init__,Method simvoc.core.duplicate_filter.DuplicateFilter.__init__()=simvoc.core.duplicate_filter.DuplicateFilter-class.html#__init__,Method simvoc.core.filter_results.ResultFilter.__init__()=simvoc.core.filter_results.ResultFilter-class.html#__init__,Method simvoc.core.grid_sim.Grid.__init__()=simvoc.core.grid_sim.Grid-class.html#__init__,Method simvoc.core.input_manager.FlexInput.__init__()=simvoc.core.input_manager.FlexInput-class.html#__init__,Method simvoc.core.job_format_reader.JobReader.__init__()=simvoc.core.job_format_reader.JobReader-class.html#__init__,Method simvoc.core.job_model.Job.__init__()=simvoc.core.job_model.Job-class.html#__init__,Method simvoc.core.job_model.PilotJob.__init__()=simvoc.core.job_model.PilotJob-class.html#__init__,Method simvoc.core.kernel.Event.__init__()=simvoc.core.kernel.Event-class.html#__init__,Method simvoc.core.kernel.EventQueue.__init__()=simvoc.core.kernel.EventQueue-class.html#__init__,Method simvoc.core.kernel.Output.__init__()=simvoc.core.kernel.Output-class.html#__init__,Method simvoc.core.kernel.Simulator.__init__()=simvoc.core.kernel.Simulator-class.html#__init__,Method simvoc.core.kernel.StreamOutput.__init__()=simvoc.core.kernel.StreamOutput-class.html#__init__,Method simvoc.core.map_format_reader.MapReader.__init__()=simvoc.core.map_format_reader.MapReader-class.html#__init__,Method simvoc.core.metascheduler.Metascheduler.__init__()=simvoc.core.metascheduler.Metascheduler-class.html#__init__,Method simvoc.core.results.AggregationResult.__init__()=simvoc.core.results.AggregationResult-class.html#__init__,Method simvoc.core.results.DiscardResult.__init__()=simvoc.core.results.DiscardResult-class.html#__init__,Method simvoc.core.results.DiscrepancyResult.__init__()=simvoc.core.results.DiscrepancyResult-class.html#__init__,Method simvoc.core.results.FileRequestResult.__init__()=simvoc.core.results.FileRequestResult-class.html#__init__,Method simvoc.core.results.FileTransferResult.__init__()=simvoc.core.results.FileTransferResult-class.html#__init__,Method simvoc.core.results.JobResult.__init__()=simvoc.core.results.JobResult-class.html#__init__,Method simvoc.core.results.JobStartResult.__init__()=simvoc.core.results.JobStartResult-class.html#__init__,Method simvoc.core.results.JobSubmitResult.__init__()=simvoc.core.results.JobSubmitResult-class.html#__init__,Method simvoc.core.results.MetadataResult.__init__()=simvoc.core.results.MetadataResult-class.html#__init__,Method simvoc.core.results.Result.__init__()=simvoc.core.results.Result-class.html#__init__,Method simvoc.core.results.SchedResult.__init__()=simvoc.core.results.SchedResult-class.html#__init__,Method simvoc.core.results.SiteRejectionResult.__init__()=simvoc.core.results.SiteRejectionResult-class.html#__init__,Method simvoc.core.results.SiteResult.__init__()=simvoc.core.results.SiteResult-class.html#__init__,Method simvoc.core.results.TraceResult.__init__()=simvoc.core.results.TraceResult-class.html#__init__,Method simvoc.core.results.VMPilotResult.__init__()=simvoc.core.results.VMPilotResult-class.html#__init__,Method simvoc.core.results.VMResult.__init__()=simvoc.core.results.VMResult-class.html#__init__,Method simvoc.core.results.VOCResult.__init__()=simvoc.core.results.VOCResult-class.html#__init__,Method simvoc.core.results.VOResult.__init__()=simvoc.core.results.VOResult-class.html#__init__,Method simvoc.core.results.WatchdogResult.__init__()=simvoc.core.results.WatchdogResult-class.html#__init__,Method simvoc.core.scheduler.Scheduler.__init__()=simvoc.core.scheduler.Scheduler-class.html#__init__,Method simvoc.core.storage.DataFile.__init__()=simvoc.core.storage.DataFile-class.html#__init__,Method simvoc.core.storage.FileCache.__init__()=simvoc.core.storage.FileCache-class.html#__init__,Method simvoc.core.storage.FileStore.__init__()=simvoc.core.storage.FileStore-class.html#__init__,Method simvoc.core.virtualization.VMHost.__init__()=simvoc.core.virtualization.VMHost-class.html#__init__,Method simvoc.core.virtualization.VMImage.__init__()=simvoc.core.virtualization.VMImage-class.html#__init__,Method simvoc.core.virtualization.VMMonitor.__init__()=simvoc.core.virtualization.VMMonitor-class.html#__init__,Method simvoc.core.virtualization.VirtualMachine.__init__()=simvoc.core.virtualization.VirtualMachine-class.html#__init__,Method simvoc.core.vo_format_reader.VO.__init__()=simvoc.core.vo_format_reader.VO-class.html#__init__,Method simvoc.core.vo_format_reader.VOReader.__init__()=simvoc.core.vo_format_reader.VOReader-class.html#__init__,Method simvoc.core.voc_sim.AutoVOC.__init__()=simvoc.core.voc_sim.AutoVOC-class.html#__init__,Method simvoc.core.voc_sim.VMPilot.__init__()=simvoc.core.voc_sim.VMPilot-class.html#__init__,Method simvoc.core.voc_sim.VOC.__init__()=simvoc.core.voc_sim.VOC-class.html#__init__,Method simvoc.core.watchdog_sim.WatchRecord.__init__()=simvoc.core.watchdog_sim.WatchRecord-class.html#__init__,Method simvoc.core.watchdog_sim.Watchdog.__init__()=simvoc.core.watchdog_sim.Watchdog-class.html#__init__,Method simvoc.input.common_writer.CommonWriter.__init__()=simvoc.input.common_writer.CommonWriter-class.html#__init__,Method simvoc.input.data_input.Data.__init__()=simvoc.input.data_input.Data-class.html#__init__,Method simvoc.input.egee_map_input.EGEEMap.__init__()=simvoc.input.egee_map_input.EGEEMap-class.html#__init__,Method simvoc.input.egee_map_input.SiteParser.__init__()=simvoc.input.egee_map_input.SiteParser-class.html#__init__,Method simvoc.input.egee_rtm_input.JobTrace.__init__()=simvoc.input.egee_rtm_input.JobTrace-class.html#__init__,Method simvoc.input.flat_data_input.FlatData.__init__()=simvoc.input.flat_data_input.FlatData-class.html#__init__,Method simvoc.input.job_format_writer.JobWriter.__init__()=simvoc.input.job_format_writer.JobWriter-class.html#__init__,Method simvoc.input.map_format_writer.MapWriter.__init__()=simvoc.input.map_format_writer.MapWriter-class.html#__init__,Method simvoc.input.mod_ldif.LDIFCopy.__init__()=simvoc.input.mod_ldif.LDIFCopy-class.html#__init__,Method simvoc.input.mod_ldif.LDIFParser.__init__()=simvoc.input.mod_ldif.LDIFParser-class.html#__init__,Method simvoc.input.mod_ldif.LDIFRecordList.__init__()=simvoc.input.mod_ldif.LDIFRecordList-class.html#__init__,Method simvoc.input.mod_ldif.LDIFWriter.__init__()=simvoc.input.mod_ldif.LDIFWriter-class.html#__init__,Method simvoc.input.tabbed_data_input.TabbedData.__init__()=simvoc.input.tabbed_data_input.TabbedData-class.html#__init__,Method simvoc.input.vo_format_writer.VOWriter.__init__()=simvoc.input.vo_format_writer.VOWriter-class.html#__init__"><a title="simvoc.core.aggregator.Aggregator.__init__
simvoc.core.ce_sim.Site.__init__
simvoc.core.cluster_sim.Cluster.__init__
simvoc.core.cluster_sim.Machine.__init__
simvoc.core.cluster_sim.MachineFactory.__init__
simvoc.core.common_reader.CommonReader.__init__
simvoc.core.condor_sim.Condor.__init__
simvoc.core.control_scheduler.ControlScheduler.__init__
simvoc.core.db_output.DBOutput.__init__
simvoc.core.duplicate_filter.DuplicateFilter.__init__
simvoc.core.filter_results.ResultFilter.__init__
simvoc.core.grid_sim.Grid.__init__
simvoc.core.input_manager.FlexInput.__init__
simvoc.core.job_format_reader.JobReader.__init__
simvoc.core.job_model.Job.__init__
simvoc.core.job_model.PilotJob.__init__
simvoc.core.kernel.Event.__init__
simvoc.core.kernel.EventQueue.__init__
simvoc.core.kernel.Output.__init__
simvoc.core.kernel.Simulator.__init__
simvoc.core.kernel.StreamOutput.__init__
simvoc.core.map_format_reader.MapReader.__init__
simvoc.core.metascheduler.Metascheduler.__init__
simvoc.core.results.AggregationResult.__init__
simvoc.core.results.DiscardResult.__init__
simvoc.core.results.DiscrepancyResult.__init__
simvoc.core.results.FileRequestResult.__init__
simvoc.core.results.FileTransferResult.__init__
simvoc.core.results.JobResult.__init__
simvoc.core.results.JobStartResult.__init__
simvoc.core.results.JobSubmitResult.__init__
simvoc.core.results.MetadataResult.__init__
simvoc.core.results.Result.__init__
simvoc.core.results.SchedResult.__init__
simvoc.core.results.SiteRejectionResult.__init__
simvoc.core.results.SiteResult.__init__
simvoc.core.results.TraceResult.__init__
simvoc.core.results.VMPilotResult.__init__
simvoc.core.results.VMResult.__init__
simvoc.core.results.VOCResult.__init__
simvoc.core.results.VOResult.__init__
simvoc.core.results.WatchdogResult.__init__
simvoc.core.scheduler.Scheduler.__init__
simvoc.core.storage.DataFile.__init__
simvoc.core.storage.FileCache.__init__
simvoc.core.storage.FileStore.__init__
simvoc.core.virtualization.VMHost.__init__
simvoc.core.virtualization.VMImage.__init__
simvoc.core.virtualization.VMMonitor.__init__
simvoc.core.virtualization.VirtualMachine.__init__
simvoc.core.vo_format_reader.VO.__init__
simvoc.core.vo_format_reader.VOReader.__init__
simvoc.core.voc_sim.AutoVOC.__init__
simvoc.core.voc_sim.VMPilot.__init__
simvoc.core.voc_sim.VOC.__init__
simvoc.core.watchdog_sim.WatchRecord.__init__
simvoc.core.watchdog_sim.Watchdog.__init__
simvoc.input.common_writer.CommonWriter.__init__
simvoc.input.data_input.Data.__init__
simvoc.input.egee_map_input.EGEEMap.__init__
simvoc.input.egee_map_input.SiteParser.__init__
simvoc.input.egee_rtm_input.JobTrace.__init__
simvoc.input.flat_data_input.FlatData.__init__
simvoc.input.job_format_writer.JobWriter.__init__
simvoc.input.map_format_writer.MapWriter.__init__
simvoc.input.mod_ldif.LDIFCopy.__init__
simvoc.input.mod_ldif.LDIFParser.__init__
simvoc.input.mod_ldif.LDIFRecordList.__init__
simvoc.input.mod_ldif.LDIFWriter.__init__
simvoc.input.tabbed_data_input.TabbedData.__init__
simvoc.input.vo_format_writer.VOWriter.__init__" class="py-name" href="#" onclick="return doclink('link-3', '__init__', 'link-3');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">output_handler</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">   <tt class="py-comment">#</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">   <tt class="py-comment"># Override docstrings on the handlers</tt> </tt>
<a name="DuplicateFilter.handle_append"></a><div id="DuplicateFilter.handle_append-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="DuplicateFilter.handle_append-toggle" onclick="return toggle('DuplicateFilter.handle_append');">-</a><tt class="py-line">   <tt class="py-keyword">def</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html#handle_append">handle_append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">result</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter.handle_append-collapsed" style="display:none;" pad="+++" indent="+++++++"></div><div id="DuplicateFilter.handle_append-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">      <tt class="py-docstring">'''</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">      Does nothing in this implementation and is not called.</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">      '''</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">      <tt class="py-keyword">pass</tt> </tt>
</div><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">   <tt class="py-comment">#</tt> </tt>
<a name="DuplicateFilter.handle_close"></a><div id="DuplicateFilter.handle_close-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="DuplicateFilter.handle_close-toggle" onclick="return toggle('DuplicateFilter.handle_close');">-</a><tt class="py-line">   <tt class="py-keyword">def</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html#handle_close">handle_close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter.handle_close-collapsed" style="display:none;" pad="+++" indent="+++++++"></div><div id="DuplicateFilter.handle_close-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">      <tt class="py-docstring">'''</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">      Does nothing in this implementation and is not called.</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-docstring">      '''</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">      <tt class="py-keyword">pass</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">   <tt class="py-comment">#</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">   <tt class="py-comment"># Override the core append/close methods, since pipelining needs to be</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">   <tt class="py-comment"># suppressed on duplicates</tt> </tt>
<a name="DuplicateFilter.append"></a><div id="DuplicateFilter.append-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="DuplicateFilter.append-toggle" onclick="return toggle('DuplicateFilter.append');">-</a><tt class="py-line">   <tt class="py-keyword">def</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html#append">append</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">result</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter.append-collapsed" style="display:none;" pad="+++" indent="+++++++"></div><div id="DuplicateFilter.append-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">      <tt class="py-docstring">'''</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line"><tt class="py-docstring">      Appends a result to the DuplicateFilter. If the result is determined to</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-docstring">      be different than the previous result, then it is passed downstream when</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">      the next non-duplicate result arrives. When a sequence of identical</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">      results is observed, both the first and the last results are passed</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">      downstream, so that timestamps will be correct when drawing constant</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">      graph segments. Intermediate duplicates will be discarded.</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">      @param result: Result to submit to the filter</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">      '''</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">      <tt class="py-name">rtype</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">result_type</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">      <tt class="py-name">write</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">      <tt class="py-keyword">if</tt> <tt class="py-name">rtype</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">:</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">         <tt class="py-name">last</tt><tt class="py-op">,</tt> <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">[</tt><tt class="py-name">rtype</tt><tt class="py-op">]</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">         <tt class="py-keyword">if</tt> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method simvoc.core.results.Result.same_as()=simvoc.core.results.Result-class.html#same_as"><a title="simvoc.core.results.Result.same_as" class="py-name" href="#" onclick="return doclink('link-4', 'same_as', 'link-4');">same_as</a></tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt class="py-name">count</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">[</tt><tt class="py-name">rtype</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-name">count</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">            <tt class="py-name">write</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">         <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">count</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">               <tt class="py-comment"># Write the last of the set of identical results, so that</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">               <tt class="py-comment"># constant graph segments will be correct</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">               <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">output_handler</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method simvoc.core.duplicate_filter.DuplicateFilter.append()=simvoc.core.duplicate_filter.DuplicateFilter-class.html#append,Method simvoc.core.filter_results.ResultFilter.append()=simvoc.core.filter_results.ResultFilter-class.html#append,Method simvoc.core.kernel.Output.append()=simvoc.core.kernel.Output-class.html#append"><a title="simvoc.core.duplicate_filter.DuplicateFilter.append
simvoc.core.filter_results.ResultFilter.append
simvoc.core.kernel.Output.append" class="py-name" href="#" onclick="return doclink('link-5', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">      <tt class="py-keyword">if</tt> <tt class="py-name">write</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">[</tt><tt class="py-name">rtype</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">output_handler</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="simvoc.core.duplicate_filter.DuplicateFilter.append
simvoc.core.filter_results.ResultFilter.append
simvoc.core.kernel.Output.append" class="py-name" href="#" onclick="return doclink('link-6', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
</div><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">   <tt class="py-comment">#</tt> </tt>
<a name="DuplicateFilter.close"></a><div id="DuplicateFilter.close-def"><a name="L94"></a><tt class="py-lineno"> 94</tt> <a class="py-toggle" href="#" id="DuplicateFilter.close-toggle" onclick="return toggle('DuplicateFilter.close');">-</a><tt class="py-line">   <tt class="py-keyword">def</tt> <a class="py-def-name" href="simvoc.core.duplicate_filter.DuplicateFilter-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DuplicateFilter.close-collapsed" style="display:none;" pad="+++" indent="+++++++"></div><div id="DuplicateFilter.close-expanded"><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">      <tt class="py-docstring">'''</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"><tt class="py-docstring">      Writes the final duplicate endpoints where sequences of duplicates have</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-docstring">      been observed (if any have been observed), then closes all output</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">      handlers in the downstream portion of the pipeline.</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">      '''</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">      <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">         <tt class="py-name">last</tt><tt class="py-op">,</tt> <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">last_written</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">         <tt class="py-keyword">if</tt> <tt class="py-name">count</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">output_handler</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="simvoc.core.duplicate_filter.DuplicateFilter.append
simvoc.core.filter_results.ResultFilter.append
simvoc.core.kernel.Output.append" class="py-name" href="#" onclick="return doclink('link-7', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">output_handler</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method simvoc.core.duplicate_filter.DuplicateFilter.close()=simvoc.core.duplicate_filter.DuplicateFilter-class.html#close,Method simvoc.core.filter_results.ResultFilter.close()=simvoc.core.filter_results.ResultFilter-class.html#close,Method simvoc.core.input_manager.FlexInput.close()=simvoc.core.input_manager.FlexInput-class.html#close,Method simvoc.core.kernel.Output.close()=simvoc.core.kernel.Output-class.html#close"><a title="simvoc.core.duplicate_filter.DuplicateFilter.close
simvoc.core.filter_results.ResultFilter.close
simvoc.core.input_manager.FlexInput.close
simvoc.core.kernel.Output.close" class="py-name" href="#" onclick="return doclink('link-8', 'close', 'link-8');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">   <tt class="py-comment">#</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:36 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
